package com.szj.pet.hospital.controller;

import com.szj.pet.hospital.common.result.Result;
import com.szj.pet.hospital.model.hosp.Statistics;
import com.szj.pet.hospital.model.hosp.User;
import com.szj.pet.hospital.service.StatisticsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "预约订单统计管理")
@RestController
@RequestMapping("admin/hosp/statistics")
//@CrossOrigin
public class StatisticsController {

    @Autowired
    private StatisticsService statisticsService;
    //1 查询预约统计信息
    @ApiOperation(value = "获取所有预约统计信息")
    @GetMapping("findAll")
    public Result findAllStatistics() {
        //调用service的方法
        List<Statistics> list = statisticsService.list();
        return Result.ok(list);
    }
}
